package com.saui.traceu.model;


/**
 * A class to represent a single trace recording session.
 */ 

public class Session {
    private long id;
    private long startTime;
    private long endTime;
    private String title;
    private boolean isSaved;
    
    public Session() {
    	startTime = System.currentTimeMillis();
		String date = (String)android.text.format.DateFormat.format("yyyy-MM-dd hh:mm:ss", new java.util.Date());
		title = date;
		endTime = -1;
		isSaved = false;
    }
    
    public void endSession() {
    	endTime = System.currentTimeMillis();
    }
    
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getStartTime() {
		return startTime;
	}
	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}
	public long getEndTime() {
		return endTime;
	}
	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public boolean isSaved() {
		return isSaved;
	}
	public void setSaved(boolean isSaved) {
		this.isSaved = isSaved;
	}
}